package com.hyfrogx.modules.zoom.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyfrogx.common.utils.QueryExt;
import com.hyfrogx.modules.zoom.dao.HyZoomHistoryDao;
import com.hyfrogx.modules.zoom.entity.HyZoomHistory;
import com.hyfrogx.modules.zoom.service.HyZoomHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：Li9527
 * @date ：Created in 2019-04-03 10:55
 * @description：会议历史记录实现类
 * @modified By：
 * @version: 1.0
 */
@Service("HyZoomHistoryService")
public class HyZoomHistoryServiceImpl extends ServiceImpl<HyZoomHistoryDao, HyZoomHistory> implements HyZoomHistoryService {

    @Autowired
    HyZoomHistoryDao historyDao;

    @Override
    public Page selectPageByConditions(QueryExt query) {
        Map map = new HashMap();
        map.putAll(query.getCondition());
        query.setRecords(historyDao.selectPageByConditions(query, map));
        return query;
    }

    @Override
    public Integer countUidUserfree(Integer hostid, String bak) {
        int result = historyDao.countUidFreeNum(hostid, bak);
        return result;
    }

}
